-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Improve robustness of releases. Fixes #3004 #3009
Conversation
@@ -233,7 +233,7 @@ jobs: | |||
- yarn-packages-v3-{{ checksum "ui/yarn.lock" }} | |||
- run: | |||
name: Download dependencies | |||
command: yarn --cwd ui install --frozen-lockfile --ignore-optional --non-interactive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we make these the default options in the .yarnrc
@@ -78,7 +71,7 @@ CONTROLLER_IMAGE_FILE := dist/controller-image.$(VERSION) | |||
STATIC_BUILD ?= true | |||
CI ?= false | |||
DB ?= postgres | |||
K3D := $(shell if [ "`kubectl config current-context`" = "k3s-default" ]; then echo true; else echo false; fi) | |||
K3D := $(shell if [ `which kubectl` <> '' ] && [ "`kubectl config current-context`" = "k3s-default" ]; then echo true; else echo false; fi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removes annoying kubectl not found
warning
@@ -127,7 +120,7 @@ endef | |||
define docker_build | |||
# If we're making a dev build, we build this locally (this will be faster due to existing Go build caches). | |||
if [ $(DEV_IMAGE) = true ]; then $(MAKE) dist/$(2)-$(OUTPUT_IMAGE_OS)-$(OUTPUT_IMAGE_ARCH) && mv dist/$(2)-$(OUTPUT_IMAGE_OS)-$(OUTPUT_IMAGE_ARCH) $(2); fi | |||
docker build $(DOCKER_BUILD_OPTS) -t $(IMAGE_NAMESPACE)/$(1):$(VERSION) --target $(1) -f $(DOCKERFILE) --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) . | |||
docker build --progress plain $(DOCKER_BUILD_OPTS) -t $(IMAGE_NAMESPACE)/$(1):$(VERSION) --target $(1) -f $(DOCKERFILE) --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"plain" shows more info and made issues easier to diagnose
@@ -167,8 +160,9 @@ else | |||
endif | |||
|
|||
$(HOME)/go/bin/staticfiles: | |||
# Install the "staticfiles" tool | |||
$(call backup_go_mod) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is what was making builds "dirty"
@@ -16,7 +16,27 @@ To generate new manifests and perform basic checks: | |||
|
|||
Publish the images and local Git changes (disabling K3D as this is faster and more reliable for releases): | |||
|
|||
make publish-release K3D=false | |||
make publish-release K3D=false VERSION=v2.7.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double check the version here
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.Fixes #3004
v2.8.0 had no less than three problems:
I believe this all stems from the v2.8.0 tag having been applied to an old commit. Either way, we (I) should have a checklist to prevent these problems.
Additionally, what should be clean builds show
dirty
. In the past this has been things like file permissions. I'd like to understand why this is.